import java.util.Scanner;

public class SequenceOfNumbers {
	public static void main(String [] args) {
		
		Scanner reader = new Scanner(System.in);
		
		int start = reader.nextInt();
		int end = reader.nextInt();
		int counter = 0;
		
		for(int i=start; i<=end; i++){
			
			int currentNumber = i;
			while(currentNumber>0){
				if(currentNumber % 3 == 0){
					currentNumber+=4;
				}
				else if(currentNumber % 4 == 0){
					currentNumber/=2;
				}
				else{
					currentNumber--;
				}
				
				counter++;
				if(currentNumber==0){
					System.out.println(i+ " -> " + counter);
					
					counter=0;
				}
			}

		}
		
	}
}
